import type { RouteRecordRaw } from "vue-router";

function Layout() {
  return import("@/layouts/index.vue");
}

const routes: RouteRecordRaw = {
  path: "/system",
  component: Layout,
  redirect: "/system/user",
  name: "system",
  meta: {
    title: "系统管理",
    icon: "iconfont icon-system",
  },
  children: [
    {
      path: "user",
      name: "user",
      component: () => import("@/views/system/user/index.vue"),
      meta: {
        title: "人员管理",
      },
    },
    {
      path: "role",
      name: "role",
      component: () => import("@/views/system/role/index.vue"),
      meta: {
        title: "角色管理",
      },
    },
    {
      path: "password",
      name: "password",
      component: () => import("@/views/system/password/index.vue"),
      meta: {
        title: "密码设置",
      },
    },{
      path: "log",
      name: "log",
      component: () => import("@/views/system/log/index.vue"),
      meta: {
        title: "系统操作日志",
      },
    }
  ],
};

export default routes;
